<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>基本信息</title>
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/base.css" />
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/m_index.css" />
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/m_set.css" />
	<script type="text/javascript">
		var APP = '<?php echo "__APP__" ;?>';
	</script>
	<script type="text/javascript" src="__PUBLIC__/js/jquery-1.11.0.min.js"></script>
	<script type="text/javascript" src="__PUBLIC__/js/head.js"></script>
	<script type="text/javascript" src="__PUBLIC__/js/menu.js"></script>
	<script type="text/javascript" src="__PUBLIC__/js/common.js"></script>
	<!-- 为了保证IE载入以下文件 -->
	<script type="text/javascript" src="__PUBLIC__/Css/es5-shim/es5-sham.min.js"></script>
	<script type="text/javascript" src="__PUBLIC__/Css/es5-shim/es5-shim.min.js"></script>
	<!-- 载入less.js -->
	<script type="text/javascript" src="__PUBLIC__/Css/es5-shim/less-1.5.0.min.js"></script>
	<script type="text/javascript">
		$(function(){
			 // 显示“设为默认”
			$('.address-table tr').hover(function(){
				$(this).find('.default').show();
			},function(){
				$(this).find('.default').hide();
			})
		})
	</script>
</head>
<body>
<load file="__PUBLIC__/head.html"/>

<!-- 主体部分 开始-->
<div id="main">
	<load file="__CONTROL_TPL__/left.html"/>
	<div id="right">
		<div class="my-set"><a href="{|U:'Member/basicInfo'}">基本信息</a><a href="{|U:'Member/userinfo'}">个人资料</a><a href="{|U:'Member/address'}" class="current">收获地址</a></div>
		<if value="is_null($address)">
		<div style="text-align:center;">您还没有添加收获地址，请添加地址</div>
		<else>
		<table class="address-table" border="0" width="100%" cellspacing="0" style="border:1px solid #eee">
			<tr bgcolor="#f4f4f4" style="height:40px; font-size:14px;">
				<th width="90">收货人</th>
				<th width="350">地址/邮编</th>
				<th width="140">电话/手机</th>
				<th align="right" style="padding-right:20px">操作</th>
			</tr>
			<foreach from="$address" value="$v">
			<tr style="border-top:1px solid #eee; height:36px;">
				<td align="center">{$v.name}</td>
				<td align="center">{$v.address} {$v.postcode}</td>
				<td align="center">{$v.mobilephone}</td>
				<td align="right" style="padding-right:20px"><span class="set_default"><if value="$v['is_default'] eq 0"><a href="{|U:'Member/set_default',array('address_id'=>$v['address_id'])}" class="default">设为默认</a><else>默认地址</if></span> <a href="javascript:" onclick="if(confirm('确定删除吗？'))location.href='{|U:'Member/del_address',array('address_id'=>$v['address_id'])}'" class="del">删除</a> | <a href="{|U:'Member/edit',array('address_id'=>$v['address_id'])}" class="edit">修改</a></td>
			</tr>
			</foreach>
		</table>
		</if>
		<div class="add_address"><a href="{|U:'Member/add_address'}">添加地址</a></div>

	</div>
</div>
<!-- 主体部分 结束 -->

<load file="__PUBLIC__/footer.html"/>
</body>
</html>